<?php

namespace IMT\EventBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class ParticipantEventType extends AbstractType
{
   

	public function buildForm(FormBuilder $builder, array $options)
    {
        $builder
             ->add('participant','collection', array(
                'type' => 'text',
                'allow_add' => true,
                'allow_delete' => true, // should render default button, change text with widget_remove_btn
                'prototype' => true,
                'widget_add_btn' => array('label' => "ajouter participant", 'attr' => array('class' => 'btn btn-primary')),
                'show_legend' => false, // dont show another legend of subform
                'options' => array( // options for collection fields
                    'label_render' => false,
                    'widget_control_group' => false,
                    'widget_remove_btn' => array('label' => "Supprimer", 'attr' => array('class' => 'btn')),
                    'attr' => array('class' => 'input-large'),
                )
            ))


        ;
    }

    public function getName()
    {
        return 'Ajout_rappel';
    }
	
}
